package com.jili.service;

import com.jili.dao.StudentDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * ClassName: StudentService
 * Package com.jili.service
 * Description:
 *
 * @Author: 廖继礼
 * @Create: 2025/2/16
 * @Version: v1.0
 */
@Component
public class StudentService {

    @Value("小胖黑")
    private String name;

    // 不需要添加set方法
    @Autowired
    @Qualifier(value = "studentDaoImpl")
    private StudentDao StudentDaoImpl;

    public void say(){
        System.out.println(name);
        StudentDaoImpl.chat();
        System.out.println("输出了");
    }

}
